package com.learn;

import com.learn.configuration.RibbonRuleConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * @EnableEurekaClient：开启Eureka Client，服务消费者启动后可向Eureka Server处获取服务注册表
 * @EnableDiscoveryClient：通过DiscoveryClient对象获取服务注册表
 * @RibbonClient：配置应用的负载均衡策略
 * @EnableFeignClients：开启Feign Client
 */
@SpringBootApplication
@EnableEurekaClient
@EnableDiscoveryClient
@RibbonClient(
        name = "PROJECT-SERVER-DEPT",
        configuration = RibbonRuleConfiguration.class
)
@EnableFeignClients
public class ConsumerApplication80 {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication80.class, args);
    }
}
